import pandas as pd
import numpy as np
#serise 创建
#方法1
a=pd.Series(np.array([1,2,3,4,5]))
# 0    1
# 1    2
# 2    3
# 3    4
# 4    5
#方法2
a1=pd.Series(data=[1,2,3,4,5],index=[11,22,33,44,55])#data可以是list也可以是np.array
# 11    1
# 22    2
# 33    3
# 44    4
# 55    5
#方法3
a3=pd.Series({"red":10,"green":20,"blue":30})
# red      10
# green    20
# blue     30

# series常见属性
print(a3.index)#Index(['red', 'green', 'blue'], dtype='object') #<class 'pandas.core.indexes.base.Index'>
print(a3.values)#[10 20 30]
print(a3[2])#30
